package com.lxh.lxhcrm.model.pojos;

import javax.persistence.*;
import java.util.Objects;

/**
 * 开发团队 ：lxh
 * @author ：鞠玮
 * 开发时间 ：2020/1/30 10:06
 * 类的名称 ：DataDictionary
 * 类的描述 ：数据字典表
 */
@Entity
@Table(name = "data_dictionary", schema = "lxh_crm", catalog = "")
public class DataDictionary {
    private int ddicId;
    private String ddicName;
    private String tableName;

    @Id
    @Column(name = "ddic_id", nullable = false)
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    public int getDdicId() {
        return ddicId;
    }

    public void setDdicId(int ddicId) {
        this.ddicId = ddicId;
    }

    @Basic
    @Column(name = "ddic_name", nullable = true, length = 12)
    public String getDdicName() {
        return ddicName;
    }

    public void setDdicName(String ddicName) {
        this.ddicName = ddicName;
    }

    @Basic
    @Column(name = "table_name", nullable = true, length = 32)
    public String getTableName() {
        return tableName;
    }

    public void setTableName(String tableName) {
        this.tableName = tableName;
    }



    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        DataDictionary that = (DataDictionary) o;
        return ddicId == that.ddicId &&
                Objects.equals(ddicName, that.ddicName) &&
                Objects.equals(tableName, that.tableName) ;
    }

    @Override
    public int hashCode() {
        return Objects.hash(ddicId, ddicName, tableName);
    }
}
